home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…rary 7 (Internal Edition) / Apple R&P Lib Internal v7.0.iso / 5-Fonts & Software / Macintosh Yellow Pages 2.0 / Macintosh Yellow Pages 2.0 / background_29303.txt < prev    next >
Text File  |  1991-03-12  |  3KB  |  163 lines

  1. -- background: 29303 from stack: in.0
  2. -- bmap block id: 29474
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Registration
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global viewTime
  9.   put the seconds into viewTime
  10. end openCard
  11.  
  12. on returnKey
  13.   global stringToFind
  14.   if the visible of msg is true or stringToFind is empty then
  15.     pass returnKey
  16.   else
  17.     if the foundText is not empty then
  18.       find string stringToFind
  19.       if the result is not "not found" then
  20.         play stop
  21.         play harpsichord a7t ae
  22.       end if
  23.     end if
  24.   end if
  25. end returnKey
  26.  
  27. on find
  28.   if the visible of msg is true then
  29.     show msg
  30.   end if
  31.   pass find
  32. end find
  33.  
  34. on arrowKey
  35.   -- do nothing
  36. end arrowKey
  37.  
  38.  
  39.  
  40. -- part 13 (field)
  41. -- low flags: 01
  42. -- high flags: 0000
  43. -- rect: left=2 top=3 right=21 bottom=451
  44. -- title width / last selected line: 0
  45. -- icon id / first selected line: 0 / 0
  46. -- text alignment: 0
  47. -- font id: 20
  48. -- text size: 12
  49. -- style flags: 2304
  50. -- line height: 16
  51. -- part name: Header
  52.  
  53.  
  54. -- part 22 (field)
  55. -- low flags: 01
  56. -- high flags: 0000
  57. -- rect: left=343 top=3 right=20 bottom=510
  58. -- title width / last selected line: 0
  59. -- icon id / first selected line: 0 / 0
  60. -- text alignment: 65535
  61. -- font id: 20
  62. -- text size: 12
  63. -- style flags: 2304
  64. -- line height: 16
  65. -- part name: Page Number
  66.  
  67.  
  68. -- part 43 (button)
  69. -- low flags: 00
  70. -- high flags: 0000
  71. -- rect: left=94 top=305 right=337 bottom=130
  72. -- title width / last selected line: 0
  73. -- icon id / first selected line: 0 / 0
  74. -- text alignment: 1
  75. -- font id: 0
  76. -- text size: 12
  77. -- style flags: 0
  78. -- line height: 16
  79. -- part name: Home
  80.  
  81.  
  82. -- part 49 (button)
  83. -- low flags: 00
  84. -- high flags: 2000
  85. -- rect: left=163 top=99 right=118 bottom=229
  86. -- title width / last selected line: 0
  87. -- icon id / first selected line: 0 / 0
  88. -- text alignment: 1
  89. -- font id: 0
  90. -- text size: 12
  91. -- style flags: 0
  92. -- line height: 16
  93. -- part name: Cancel
  94. ----- HyperTalk script -----
  95. on mouseUp
  96.   go to card "Registration"
  97. end mouseUp
  98.  
  99.  
  100.  
  101. -- part 50 (button)
  102. -- low flags: 00
  103. -- high flags: 2000
  104. -- rect: left=463 top=305 right=337 bottom=499
  105. -- title width / last selected line: 0
  106. -- icon id / first selected line: 0 / 0
  107. -- text alignment: 1
  108. -- font id: 0
  109. -- text size: 12
  110. -- style flags: 0
  111. -- line height: 16
  112. -- part name: Contents
  113. ----- HyperTalk script -----
  114. on mouseDown
  115.   play stop
  116.   play harpsichord a7e
  117. end mouseDown
  118.  
  119. on mouseUp
  120.   put true into allClear
  121.   repeat with n = 1 to 14
  122.     if the hilite of card button n is true then
  123.       put false into allClear
  124.       exit repeat
  125.     end if
  126.   end repeat
  127.  
  128.   if card field "Address" is not empty then
  129.     put false into allClear
  130.   end if
  131.  
  132.   if card field "Other" is not empty then
  133.     put false into allClear
  134.   end if
  135.  
  136.   if allClear then
  137.     visual effect dissolve
  138.     go to card "Registration Dissolve"
  139.     visual effect iris close to black
  140.     visual effect iris open
  141.     go to card "Main Menu"
  142.   else
  143.     global alreadyPrinted
  144.     if not alreadyPrinted then
  145.       answer "You haven't printed this page yet.  Print?" with "No" or "OK"
  146.       if it is "OK" then
  147.         global alreadyPrinted
  148.         put true into alreadyPrinted
  149.         set lockScreen to true
  150.         open printing
  151.         print 2 cards
  152.         close printing
  153.         set lockScreen to false
  154.       end if
  155.     end if
  156.     visual effect dissolve
  157.     go to card "Registration Dissolve"
  158.     visual effect iris close to black
  159.     visual effect iris open
  160.     go to card "Main Menu"
  161.   end if
  162. end mouseUp
  163.